Obesity and Type 2 diabetes have skyrocketed to epidemic proportions in American children and adults. To prevent the onset, initiate the reversal, and avoid the relapse of obesity, we must first identify the neural underpinnings of unhealthy eating choices and habits. The immediate goals of this innovative proposal are to decipher the neural code predicting compulsive overconsumption of sugar and to develop new approaches, algorithms, and technologies to detect neural signals of craving in real-time to avert maladaptive behaviors with unprecedented precision. Specifically, the project outline will begin by identifying neural circuits mediating compulsive sucrose seeking. Next, we will record neural activity using in vivo electrophysiology and fluorescence microendoscopy of GCaMP5-expressing cells to collect precise, first-order, raw features with high signal-to-noise ratio during cue-induced reinstatement and compulsion behavioral assays with their time-locked neural correlates allows for the identification of craving states. Then, we will use machine learning algorithms such as support vector machine classification of neural activity allows for a Bayesian hidden Markov model for a transition diagram between states in craving-compulsion-consumption behavioral chains. Following identification of neural activity signaling craving states (operationally defind as the behavioral state immediately preceding compulsive reward-seeking), real-time state detection will be used to trigger precise optogenetic inhibition of compulsive sucrose-seeking. A successful outcome of this research would establish a new paradigm for the treatment for obesity, focusing on reprogramming the neural circuit perturbations that cause obesity, as opposed to treating the physical consequences of a neural circuit imbalance - an approach that could also be applied to other neuropsychiatric disorders including addiction, anxiety, depression, bipolar disorder and obsessive compulsive disorder (OCD). This proposal is ideally suited for the New Innovator Award for the following reasons: First, the ultimate goal of this research is to lay the foundation for translating Neural Circuit Reprogramming to human patients. Second, the proposal is focused on technology development, delivering new technologies that will enable not state-identification and dynamic triggering used for Neural Circuit Reprogramming, and serve as springboards for other fields. Third, this proposal heavily leverages my unique background in sucrose-self administration, relapse, optogenetics, electrophysiology and imaging, but is technically and conceptually distinct from my lab's other studies on acute perturbations that affect anxiety, depression and addiction. As a new faculty member at MIT, I am poised at the nexus of science, engineering, computation and technology and am equipped with the precise skill set and expertise to execute this high-risk, yet potentially revolutionary project.